<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>3box.com</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <meta name="keywords" content="mock, mock工具" />
    <meta name="description" content="mock, mock工具">

    <link rel="stylesheet" href="/layui/css/layui.css" media="all">

    <link rel="stylesheet" href="/css/common.css" media="all">




</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <%@ include file="/pagepart/horizontal_navi.jsp"%>

    <%@ include file="/pagepart/aliyun_vertical_navi.jsp"%>

    <div class="layui-body">
        <blockquote class="layui-elem-quote"></blockquote>
        <div class="layui-col-md10" style="margin-left: 20px;">

            <form class="layui-form layui-form-pane">

                <div class="layui-form-item layui-col-md8">

                    <button type="button" class="layui-btn" id="test5"><i class="layui-icon"></i>上传视频</button>
                </div>

            </form>
        </div>

    </div>

</div>
<script src="/zui/lib/jquery/jquery.js"></script>
<script src="/layui/layui.js" charset="utf-8"></script>
<script>
    layui.use('upload', function(){
        var $ = layui.jquery
            ,upload = layui.upload;

        upload.render({
            elem: '#test5'
            ,url: '/aliyun/upload.do'
            ,accept: 'video' //视频
            ,before: function(obj){ //obj参数包含的信息，跟 choose回调完全一致，可参见上文。
                layer.load(); //上传loading
            }
            ,done: function(res){
                layer.closeAll('loading'); //关闭loading
                alert("上传成功");
            }
            ,error: function(index, upload){
                layer.closeAll('loading'); //关闭loading
                alert("上传失败");
            }
        });



    });

</script>
</body>
</html>

